package com.movitech.mobile.cz.base.sys.service;

import com.baomidou.mybatisplus.service.IService;
import com.movitech.mobile.cz.base.sys.entity.SAttachment;
import com.movitech.mobile.cz.base.sys.entity.ext.ExtSAttachment;
import com.movitech.mobile.cz.base.sys.entity.ext.ExtSAttachmentReq;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 附件 服务类
 * </p>
 *
 * @author Movitech Mobile
 * @since 2018-03-01
 */
public interface SAttachmentService extends IService<SAttachment> {

    SAttachment getByAttachmentPath(String attachmentPath);

    SAttachment getOneByEntity(SAttachment sAttachment);

    List<SAttachment> getByFormIdAndAttachmentType(String formId,Integer type,Integer subType);
    
    List<SAttachment> getExtByFormIdAndAttachmentType(String formId,Integer type,Integer subType);

    List<SAttachment> getByFormIdOrderByType(String formId);

    List<ExtSAttachment> getExtByEntity(ExtSAttachmentReq extSAttachmentReq);

    void updateSendTime(SAttachment sAttachment);

	int deleteBatch(String relatedId, int attachmentType, int attachmentSubType);
	boolean deleteById(String id);

	List<ExtSAttachment> getExtByRelatedIdAndTypeAndSubType(String relatedId, Integer type, Integer subType);

    List<ExtSAttachment> getSAttachmentByCnd(Map<String,Object> mapParams);
}
